<template>
	<view class="container">
		<!-- logo -->
		<image class="logo" src="../../static/favicon.png" mode=""></image>
		<!-- 标题 -->
		<h2>APP在线热更新插件</h2>
		<!-- 参数 -->
		<h4>更新测试参数</h4>
		<!-- 参数 -->
		<view class="params">{{ version }}</view>
		<!-- 插件 -->
		<package-version-update id="3" remark="首页检查更新" @check="onHandleCheck"></package-version-update>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				version: {},
			}
		},
		methods: {
			onHandleCheck(e) {
				this.version = e;
				if (e.needUpdate) {
					// 隐藏tabBar
					// uni.hideTabBar();
				}
			},
		}
	}
</script>

<style>
	.container {
		padding: 20px;
		width: 700rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

		.logo {
			margin-bottom: 30rpx;
			width: 100rpx;
			height: 100rpx;
		}

		h4 {
			margin-top: 30rpx;
		}

		.params {
			font-size: 30rpx;
		}
	}
</style>